import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

import User from '../views/User.vue'
import Pay from '../views/Pay.vue'
import Worker from '../views/Worker.vue'
import Complain from "@/views/Complain";
import Info from "@/views/Info";

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home
  },

  {
    path: '/about',
    name: 'About',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  },
  {
    path:'/user',
    name:'User',
    component:User
  },
  {
    path:'/pay',
    name:'Pay',
    component:Pay
  },
  {
    path:'/worker',
    name:'Worker',
    component:Worker
  }
  ,
  {
    path: '/complain',
    name: 'Complain',
    component: Complain
  },
  {
    path: '/info',
    name: 'Info',
    component: Info
  }
]

const router = new VueRouter({
  routes
})

export default router
